﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SelectProcessAuditors.aspx.vb"
    Inherits="MyWorkflow.SelectProcessAuditors" %>

<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head runat="server">
    <title>选择抄送人</title>

    <script language="javascript" src="/_controls/settings.aspx"></script>

    <link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
    <link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">
    <link rel="stylesheet" type="text/css" href="/_nav/taskbox.css">
    <link rel="stylesheet" type="text/css" href="/_controls/tree/tree.css">
    <link href="/_nav/tabs.css" type="text/css" rel="stylesheet">

    <script language="javascript" src="/_common/scripts/global.js"></script>

    <script language="javascript" src="/_controls/util/util.js"></script>

    <script language="javascript" src="/_forms/FormBase.js"></script>

    <script type="text/javascript">

			// 确定返回
			function okClick()
			{
			    var table1 = document.getElementById("Table1");
			    var cbs = table1.getElementsByTagName("input");
			    var returnStr="";
			    for(var i = cbs.length - 1;i >= 0;i--){
			        if(cbs[i].checked){
			            returnStr += cbs[i].text + "," + cbs[i].oid;
			            returnStr += ";";
			        }
			    }
			    returnStr = returnStr.replace(/;$/g,"");
				top.returnValue = returnStr;
				top.close();
			}
			
			// 返回空值
			function returnNull()
			{
				top.returnValue = "";
				top.close();
			}
			
			//全选/取消全选
			function doCheck(o)
			{
				var bCheck = false;
				if(o.value == "全部选择")
				{
					bCheck = true;
					o.value = "全部取消";
				}
				else
				{
					bCheck = false;
					o.value = "全部选择";
				}
				
				//处理默认选中	
				if(document.all("chk"))
				{
					if(document.all("chk").length)
					{
						for (i=0;i<document.all("chk").length;i++)
						{ 
							document.all("chk")[i].checked = bCheck; 
						}
					}
					else
					{
						document.all("chk").checked = bCheck;
					}
				}
			}
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" cellspacing="0" cellpadding="0" height="100%">
        <tr>
            <td class="main" colspan="2">
                <table width="100%" cellspacing="0" cellpadding="0" height="100%">
                    <colgroup>
                        <col>
                        <col width="45">
                    </colgroup>
                    <tbody>
                        <tr height="10">
                            <td colspan="2">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="wizBox1">
                                <div id="divContent" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px;
                                    overflow: auto; width: 100%; padding-top: 5px; height: 100%">
                                    <asp:Repeater ID="repLD" runat="server">
                                        <HeaderTemplate>
                                            <table id="Table1" cellspacing="0" cellpadding="0" width="100%" >
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr height='20' onmouseover='this.bgColor="#E3E9F4"' onmouseout='this.bgColor="#ffffff"'>
                                                <td>
                                                    <span></span>
                                                    <label style="cursor: hand;">
                                                    </label>
                                                    <span>
                                                    <input id='cb<%# Eval("StepPathID") %>' oid='<%# Eval("Auditor") %>' text='<%# Eval("AuditorName") %>' type="checkbox" name="chk" />
                                                    第<%# Eval("StepPathID") %>步 <%#Eval("StepName")%> <%#Eval("AuditorName")%><%#IIf((Eval("StationName").ToString <> ""), ("（" & Eval("BUName").ToString & "-" & Eval("StationName").ToString & "）"), "")%></span>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table>
                                        </FooterTemplate>
                                    </asp:Repeater>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr height="40">
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;<button style="width: 70px" onclick="doCheck(this)" id="Button1" type="button">
                    全部选择</button>
            </td>
            <td class="buttons">
                <button style="width: 70px" onclick="okClick()" id="btnOk" type="button">
                    确 定</button>&nbsp;&nbsp;
                <button style="width: 70px" onclick="parent.window.close();" type="button">
                    取 消</button>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
